package com.mall.service.impl;

import com.mall.dao.IMenusDao;
import com.mall.domain.Menus;
import com.mall.service.IMenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 菜单的业务层实现类
 * @author : Bei-Zhen
 * @date : 2020-12-29 0:36
 */
@Service("menusService")
public class MenusServiceImpl implements IMenusService {

    @Autowired
    private IMenusDao menusDao;

    /**
     * 查询菜单父节点
     * @return
     */
    @Override
    public List<Menus> getTree() {
        return menusDao.getTree();
    }

    /**
     * 查询菜单子节点
     * @param parentId
     * @return
     */
    @Override
    public List<Menus> listChild(int parentId) {
        return menusDao.listChild(parentId);
    }
}
